import WxRequest from "mina-request";
const app=getApp();
const instance=new WxRequest({
    baseURL:"http://127.0.0.1:5000",
    timeout: 1000,
})
instance.interceptors.request=(config)=>{
    if(app.token){
        console.log(app.token)
        config.header.token=app.token
    }
  return config
}
instance.interceptors.response=(res)=>{
    return res.data
}
export default instance